/*
 Navicat MySQL Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : localhost:3306
 Source Schema         : vkmall

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 09/05/2024 09:47:43
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin_menu
-- ----------------------------
DROP TABLE IF EXISTS `admin_menu`;
CREATE TABLE `admin_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL COMMENT '路由名称',
  `desc` varchar(64) DEFAULT NULL COMMENT '路由描述',
  `route` varchar(64) DEFAULT NULL COMMENT '路由权限',
  `parent` tinyint(1) DEFAULT '0' COMMENT '父级ID',
  `type` tinyint(2) NOT NULL DEFAULT '1' COMMENT '菜单类型： 1:普通菜单 2：树状菜单  3:扩展菜单 4:链接菜单',
  `key` varchar(64) DEFAULT NULL COMMENT '路由跳转名称',
  `component` varchar(255) DEFAULT NULL COMMENT '组件路径',
  `sort` tinyint(2) DEFAULT NULL COMMENT '排序',
  `icon` varchar(64) DEFAULT NULL COMMENT '图标',
  `mode` tinyint(2) NOT NULL DEFAULT '1' COMMENT '菜单模式 1:菜单 2:页面',
  PRIMARY KEY (`id`),
  KEY `name` (`name`) USING BTREE,
  KEY `parant` (`parent`) USING BTREE,
  KEY `type` (`type`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='路由菜单表';

-- ----------------------------
-- Records of admin_menu
-- ----------------------------
BEGIN;
INSERT INTO `admin_menu` VALUES (1, '配置', '配置管理', '/config', 0, 2, 'config', '', 3, 'Setting', 1);
INSERT INTO `admin_menu` VALUES (2, '菜单管理', '菜单管理员', '/menu', 1, 1, 'menu', 'config/menu/List.vue', 2, 'Menu', 2);
INSERT INTO `admin_menu` VALUES (3, '首页', '首页控制台', '/home', 0, 1, 'home', 'home/Home.vue', 1, 'House', 2);
INSERT INTO `admin_menu` VALUES (5, '菜单详情', '菜单详情', '/menu/detail', 2, 3, 'menuDetail', 'config/menu/Detail.vue', 4, 'Menu', 2);
INSERT INTO `admin_menu` VALUES (7, '用户管理', '权限用户管理', '/admin', 1, 1, 'admin', 'config/admin/List.vue', 5, 'User', 2);
INSERT INTO `admin_menu` VALUES (8, '用户详情', '用户详情/新增编辑', '/admin/detail', 7, 3, 'adminDetail', 'config/admin/Detail.vue', 6, 'User', 2);
INSERT INTO `admin_menu` VALUES (9, '角色管理', '角色管理', '/role', 1, 1, 'role', 'config/role/List.vue', 6, 'Lollipop', 2);
INSERT INTO `admin_menu` VALUES (10, '角色详情', '角色详情', '/role/detail', 9, 3, 'roleDetail', 'config/role/Detail.vue', 7, 'Lollipop', 2);
INSERT INTO `admin_menu` VALUES (11, '角色授权', '角色授权', '/role/auth', 9, 3, 'roleAuth', 'config/role/Auth.vue', 8, 'Lollipop', 2);
COMMIT;

-- ----------------------------
-- Table structure for admin_role
-- ----------------------------
DROP TABLE IF EXISTS `admin_role`;
CREATE TABLE `admin_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL COMMENT '角色名称',
  `desc` varchar(128) DEFAULT NULL COMMENT '描述',
  `menu_ids` varchar(255) DEFAULT NULL COMMENT '菜单权限',
  PRIMARY KEY (`id`),
  KEY `name` (`name`) USING BTREE,
  KEY `menu_ids` (`menu_ids`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='管理角色表';

-- ----------------------------
-- Records of admin_role
-- ----------------------------
BEGIN;
INSERT INTO `admin_role` VALUES (1, '店员', '门店日常运营', '1,2');
INSERT INTO `admin_role` VALUES (2, '运营', '门店管理运营', '3,1,2,5,7,8,9,10,11');
COMMIT;

-- ----------------------------
-- Table structure for admin_user
-- ----------------------------
DROP TABLE IF EXISTS `admin_user`;
CREATE TABLE `admin_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL COMMENT '姓名',
  `account` varchar(64) NOT NULL COMMENT '账号',
  `pass` varchar(128) NOT NULL COMMENT '密码',
  `role` tinyint(1) DEFAULT NULL COMMENT '角色',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `name` (`name`) USING BTREE,
  KEY `account` (`account`) USING BTREE,
  KEY `create_time` (`create_time`) USING BTREE,
  KEY `role` (`role`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='管理员表';

-- ----------------------------
-- Records of admin_user
-- ----------------------------
BEGIN;
INSERT INTO `admin_user` VALUES (1, 'admin', 'admin', '1c63129ae9db9c60c3e8aa94d3e00495', -1, '2024-02-29 16:32:28');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
